

// let a = [35,36,1];
// let s = new Buffer(a).toString();
// console.log(s); // #$

// let a = [35,36,1];
// let s = new Buffer(a).toString("hex");
// console.log(s); // "232401"

// let a = [35,36,1];
// let s = new Buffer(a).toString("ascii");
// console.log(s); // "232401"

// [49,50,51,52...]
//console.log(new Buffer("3132333435", "hex")); 

// [31,32,33,34]
//console.log(new Buffer("1234"), "ascii");

// let s:string;
// s = s+"00";
// console.log(s); // 未初始化:undefined00

// let buf = new Buffer("1234","binary")
// let num = buf.readUInt32BE(0)";
// console.log(num);

//console.log(Number("0x1234"));

//  let buf = new Buffer(10);
//  buf.write("1234",0,4,"hex");
//  buf.writeInt16BE(0x3214, 0);
//  buf.writeInt32BE(0x456790, 2);
//  console.log(buf);


// let buf = new Buffer([0,1,2,3,4,5]);
// console.log(buf.slice(1)); // <Buffer 01 02 03 04 05>
// console.log(buf.slice(1,3)); // <Buffer 01 02>
// console.log(buf); // <Buffer 00 01 02 03 04 05>
// console.log(buf.slice(0, 1));

// let array = [10, 10, 30];
// array.push(556);
// console.log(array.pop());
// console.log(array);

let buf1: Buffer;
console.log(buf1.length);

